/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef GR_WRITE_H
#define GR_WRITE_H

#define BUFSIZE 1024
struct mybuffer{
   char * buf;
   long indbuf;
   long sizebuf;
};
typedef struct mybuffer BUFFER;

char *
get_text_graph(GraphFrame *gf,long *len);

void 
write_scale(BUFFER *buffer,GraphFrame *gf);
void 
write_type(BUFFER *buffer,GraphFrame *gf);
void
write_edgeattributes(BUFFER *buffer,GraphFrame *gf);
void
write_nodepositions(BUFFER *buffer,GraphFrame *gf);
void
write_edgeweights(BUFFER *buffer,GraphFrame *gf);
void
write_nodeweights(BUFFER *buffer,GraphFrame *gf);
void
write_nodeshapes(BUFFER *buffer,GraphFrame *gf);
void
write_edges(BUFFER *buffer,GraphFrame *gf);
void
write_nodes(BUFFER *buffer,GraphFrame *gf);
void
write_nodeattributes(BUFFER *buffer,GraphFrame *gf);


/* Functions for the Buffer */
void
write_in(BUFFER *buffer, char *str);
void 
resize_buffer(BUFFER *buffer);
void 
delete_in(BUFFER *buffer);
void
initialize_buf(BUFFER *buffer);

void 
write_block(BUFFER *buffer, char * block, int len);




#endif
